const Router = require('koa-router');
const router = new Router({prefix:'/role'});
const {validator} = require("../middleware/user.middleware")
const {createRoleController,getRoleController} = require("../controller/role.controller")
const {auth} = require("../middleware/auth.middleware")
//权限角色接口
router.post('/addRole',validator({
    role_name:'string',
    is_state: 'boolean',
    jurisdiction:'string'
}),auth,createRoleController)
//获取权限信息
router.get('/getRole',auth,getRoleController)

module.exports = router
